#ifndef VOLUMETOOL_H
#define VOLUMETOOL_H

#include <QWidget>

namespace Ui {
class VolumeTool;
}

class VolumeTool : public QWidget
{
    Q_OBJECT

public:
    explicit VolumeTool(QWidget *parent = nullptr);
    ~VolumeTool();

    void paintEvent(QPaintEvent *event);

    void onSilenceBtnClicked();

    bool eventFilter(QObject *watched, QEvent *event);

    void setVolume();

signals:
    void setSilence(bool muted);

    void setMusicVolume(int volumeRatio);

private:
    Ui::VolumeTool *ui;

    //是否静音
    bool isMuted = false;
    //音量
    int volumeRatio = 20;
};

#endif // VOLUMETOOL_H
